@import url(//at.alicdn.com/t/font_2919685_v665bxckl5k.css);

@import url(./themes.css);
@import url(./vars.less);

:root {
    --base-color   : rgba(20, 200, 200, 0.9);
    --border-radius: 20px;
    --base-width   : 860px;
}

// 浏览器 滚动条
::-webkit-scrollbar {
    width : 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background-color: rgba(221, 221, 221, 0.7);
}

::-webkit-scrollbar-thumb {
    background-color: rgba(20, 200, 200, 0.4);
}

// 默认样式重置
* {
    margin             : 0;
    padding            : 0;
    box-sizing         : border-box;
    // background-color: rgba(0, 0, 0, 0.1);
}

a {
    text-decoration: none;
    color          : #111;
    transition     : .2s;

    &:hover {
        color: var(--base-color) !important;
    }
}

img {
    max-width: 100%;
}

body {
    width                : 100%;
    min-height           : 100vh;
    background-color     : #fff;
    position             : relative;
    background-position  : center;
    background-size      : cover;
    background-attachment: fixed;
    transition           : backdrop-filter 2.4s;

    &.filter {
        backdrop-filter: blur(3px);
    }
}

.container,
.container-flex {
    max-width: var(--base-width);
    height   : 100%;
    margin   : 0 auto;
    position : relative;
    padding: 10px;
}

.container-flex {
    display        : flex;
    justify-content: center;
    align-items    : center;
}

header {
    width              : 100%;
    height             : 65vh;
    margin             : 0 auto;
    background-size    : cover;
    background-position: center;
    position           : relative;

    .nav-top {
        &.top-show {
            background-color: #fff;
            box-shadow      : 0 1px 5px 1px rgba(185, 179, 179, 0.1);

            .nav {
                opacity: 1;
            }
        }
        &.show {
            transition      : 1s;
            background-color: rgba(255, 255, 255, 0.92);
            box-shadow      : 0 1px 10px 1px rgba(0, 0, 0, 0.24);
    
            .nav {
                transition: 1s;
                opacity   : 1;
            }
        }
        &:hover {
            @media (min-width: @mobile-width) {
                background-color: #fff;
                box-shadow      : 0 1px 5px 1px rgba(0, 0, 0, 0.3);
    
                .nav {
                    opacity: 1;
                }
            }
    
        }


        position       : fixed;
        top            : 0;
        left           : 0;
        width          : 100%;
        height         : 60px;
        display        : flex;
        justify-content: space-between;
        align-items    : center;
        z-index        : 9999;
        transition     : .3s;

        a {
            color: #111;
        }


        #logo {
            font-size  : 26px;
            margin-left: 20px;
        }

        .menu {
            display: none;
        }

        .nav {
            display   : block;
            font-size : 20px;
            opacity   : 0;
            transition: .3s;

            .item {
                margin: 0 20px;

                &:nth-child(1) {
                    margin-left: 0;
                }
            }
        }

        .search {
            height      : 100%;
            margin-right: 20px;
            padding     : 15px 0;

            img {
                height: 100%;
            }

            .iconfont {
                font-size: 30px;
            }

            .search-box {
                width              : 0vw;
                height             : 0vh;
                position           : fixed;
                left               : 0;
                top                : 0;
                background-color   : rgb(255, 255, 255);
                background-image   : url(../img/aaa.jpg);
                background-repeat  : no-repeat;
                background-position: left bottom;
                background-size    : contain;
                display            : flex;
                justify-content    : center;
                align-items        : center;
                opacity            : 0;
                transform          : scale(0%, 0%);
                transition         : transform .4s;

                &.block {
                    width    : 100vw;
                    height   : 100vh;
                    opacity  : 1;
                    transform: scale(100%, 100%);
                }

                .quit {
                    position : absolute;
                    top      : 10px;
                    right    : 20px;
                    font-size: 18px;
                }

                form {
                    max-width: 500px;
                    color    : #444;

                    input {
                        width        : 100%;
                        padding      : 20px 20px;
                        margin       : 10px 0;
                        font-size    : 18px;
                        outline      : none;
                        border-radius: 30px;
                        border       : 1px solid rgba(0, 0, 0, 0.171);
                    }

                    input[type="submit"]:hover {
                        border: 1px solid rgba(20, 200, 200, 0.9);
                        cursor: pointer;
                    }
                }
            }
        }

        @media (max-width: @mobile-width) {
            flex-direction : column;
            justify-content: start;
            align-items    : flex-start;

            // background-color: #fff;
            .nav-top:hover {
                background-color: rgba(255, 255, 255, 0) !important;
            }

            #logo {
                margin-top: 14px;
            }

            .menu {
                display : block;
                position: fixed;
                top     : 15px;
                right   : 10px;

                .iconfont {
                    font-size: 30px;
                }
            }

            .nav {
                display         : none;
                width           : 100%;
                opacity         : 1;
                position        : fixed;
                top             : 0;
                padding-top     : 60px;
                background-color: #fff;
                z-index         : -1;

                .item {
                    display      : block;
                    width        : 100%;
                    text-align   : center;
                    margin       : 0 !important;
                    padding      : 10px 0;
                    border-bottom: 1px solid rgb(123, 218, 255);
                }
            }

            .search {
                position: fixed;
                top     : 0;
                right   : 30px;
                height  : 50px;

                form {
                    margin    : 20px;
                    margin-top: 150px;
                }
            }
        }
    }


}

main {
    background-color: rgba(255, 255, 255, 0.95);
}

footer {
    margin-top: 60px;
    height    : 200px;
    text-align: center;
}

#cd-top {
    max-width : 80px;
    overflow  : hidden;
    position  : fixed;
    right     : 36px;
    cursor    : pointer;
    bottom    : 999px;
    z-index   : 11;
    transition: .8s;

    &.down {
        @keyframes float {
            0% {
                transform: translateY(0)
            }

            50% {
                transform: translateY(-6px)
            }

            100% {
                transform: translateY(0)
            }
        }

        bottom   : 80px;
        animation: float 2s linear infinite;
    }

    @media (max-width: @mobile-width) {
        max-width: 40px;
        right    : 10px;
    }
}

.box {
    margin-top : 100px;
    color      : rgb(253, 253, 253);
    text-shadow: 1px 1px 16px rgba(0, 0, 0, 0.5);
    word-break: break-all;
    .h1 {
        font-size    : 40px;
        margin-bottom: 24px;
        font-weight  : bolder;
    }
}

#theme {
    width                 : 200px;
    height                : 40px;
    background-color      : rgba(252, 252, 252, 0.8);
    box-shadow            : 0 0 15px 5px rgba(0, 0, 0, 0.05);
    position              : fixed;
    right                 : -35px;
    bottom                : 0;
    border-top-left-radius: 10px;
    padding               : 10px;
    user-select           : none;
    z-index               : 111;
    visibility            : hidden;
    opacity               : 0;
    transition            : opacity 1s;

    &.show {
        opacity   : 1;
        visibility: visible;
    }

    .text {
        padding-left: 8px;
        font-size   : 18px;
        color       : rgb(109, 109, 109);
        cursor      : pointer;
    }

    .theme-box {
        width           : 200px;
        min-height      : 120px;
        position        : absolute;
        right           : 50px;
        bottom          : 50px;
        background-color: rgb(253, 253, 253);
        box-shadow      : 0 0 15px 5px rgba(0, 0, 0, 0.116);
        border-radius   : 10px;
        visibility      : hidden;
        opacity         : 0;
        transition      : .5s;

        &.show {
            opacity   : 1;
            visibility: visible;
            transform : scaleX(1);
        }

        &::after {
            content         : "";
            display         : block;
            background-color: rgb(253, 253, 253);
            width           : 25px;
            height          : 25px;
            transform       : rotate(45deg);
            position        : absolute;
            bottom          : -12px;
            right           : 80px;
        }

        & .item {
            margin : 10px;
            display: inline-block;
        }
    }

    @media (max-width: @mobile-width) {
        writing-mode             : vertical-rl;
        width                    : 70px;
        height                   : 70px;
        bottom                   : 200px;
        right                    : -36px;
        border-bottom-left-radius: 10px;

        .theme-box {
            writing-mode: horizontal-tb;
            width       : 150px;
            min-height  : 50px;
            right       : 80px;
            bottom      : 30px;

            &::after {
                width : 25px;
                height: 25px;
                bottom: 9px;
                right : -10px;
            }
        }
    }
}